#include "stdafx.h"
#include "GomChartDataManager.h"


CGomChartDataManager::CGomChartDataManager()
{
	ST = NULL;
	ET = NULL;
	O = NULL;
	H = NULL;
	L = NULL;
	C = NULL;
	V = NULL;
	AV = NULL;
	OI = NULL;
}


CGomChartDataManager::~CGomChartDataManager()
{
	if (ST)
		delete [] ST;
	if (ET)
		delete [] ET;
	if (O)
		delete[] O;
	if (H)
		delete[] H;
	if (L)
		delete[] L;
	if (C)
		delete[] C;
	if (V)
		delete[] V;
	if (AV)
		delete[] AV;
	if (OI)
		delete[] OI;
}

void CGomChartDataManager::SetSize(int a_Size)
{
	if (ST)
	{
		delete[] ST;
		ST = new double[a_Size];
	}
	else
	{
		ST = new double[a_Size];
	}

	if (ET)
	{
		delete[] ET;
		ET = new double[a_Size];
	}
	else
	{
		ET = new double[a_Size];
	}

	if (O)
	{
		delete[] O;
		O = new double[a_Size];
	}
	else
	{
		O = new double[a_Size];
	}

	if (H)
	{
		delete[] H;
		H = new double[a_Size];
	}
	else
	{
		H = new double[a_Size];
	}

	if (L)
	{
		delete[] L;
		L = new double[a_Size];
	}
	else
	{
		L = new double[a_Size];
	}

	if (C)
	{
		delete[] C;
		C = new double[a_Size];
	}
	else
	{
		C = new double[a_Size];
	}

	if (V)
	{
		delete[] V;
		V = new double[a_Size];
	}
	else
	{
		V = new double[a_Size];
	}

	if (AV)
	{
		delete[] AV;
		AV = new double[a_Size];
	}
	else
	{
		AV = new double[a_Size];
	}

	if (OI)
	{
		delete[] OI;
		OI = new double[a_Size];
	}
	else
	{
		OI = new double[a_Size];
	}
}

void CGomChartDataManager::Resize(int a_Size)
{

}
